Feature Overview
CAT() concatenates two or more tables.
- The second and subsequent arguments are added to the table elements of the first argument.
- Returns a concatenated table.
- The table used for the first argument is updated. (destructive)
- This function consumes 39 Token.
local tbl_1 = {'a'} local tbl_2 = {'b', 'c'} cat(tbl_1, tbl_2) ?tbl_1[1] -- a ?tbl_1[2] -- b ?tbl_1[3] -- c -- Only primary elements can be cloned by specifying an empty table for the first argument. local tbl = {1, 2, 3} local tbl_dup = cat({}, tbl) tbl[1] = 256 ?tbl_dup[1] -- 1 ?tbl_dup[2] -- 2 ?tbl_dup[3] -- 3 |
See the code in the cartridge for further examples.
may want to Use DMP() if check the converted table.
This function is included in the KNUTIL library.
Hello.
I want to use the clipboard to paste SFX data to another console as shown in the image below.
With the current (0.2.4b) function of PICO-8, you can only paste SFX data on the same console.
It would be simpler to share sound effects if they could be pasted to the clipboard in a format like
[gfx] wwhhpp... [/gfx)
In what situations do you use these conversions?
hexnumber = '3xz' --A tonum(hexnumber,1) : 768 (0x0300.0000) --B tonum("0x"..hexnumber,4) : 0 (0x0000.0000) --C tonum('0x'..hexnumber) : -- NO VALUE --([nil]) |
Example
I want "nil" to be returned when I use a character as an identifier. Therefore, I use the "C" conversion.
hexstr = '108000789$' hexval = TONORM(hexstr) -- Normalize the value [number boolian nil], otherwise it remains a string. hextable = {} if type(hexval) == 'string' then foreach(split(hexstr, 3), function(v) add(hextable, tonum('0x' .. v)) end) end -- Handle hexadecimal conversions without being converted to numbers by normalization. -- Only the value of number is stored in the hextable. -- "$" is not stored. |
I noticed that split() splits the table at the first character if you use a separator of more than two characters.
Is it a bug or a specification that split() cannot be used with separators of more than two characters?
foreach(split('123456','45'),print) --123 --56 (Expect only :6) |
Thank you.
Feature Overview
"KNUTIL" is a library for PICO-8 that contains functions that are frequently used in the games I have created.
I've kept the functions that I eventually needed in my production.
In this cart, I show you how the scene functions work with animations.
Z key: Execute the order command.
Up/Down: Select the order command.
SCENE MANAGER controls and replaces the order in which functions are called with a small number of tokens by using consecutive string instructions.
The generated SCENE can register a global function as an ORDER.
One of the registered ORDERS is retrieved by SCENE and the process is repeated for the specified length.
When the processing is finished, it repeats the processing of the next ORDER.
This is expected to facilitate the planning of the performance.
Using SCENE
ORDER COMMANDS
Create a function for ORDERS.
Run each SCENE.
ORDER function
Properties of ORDER
The following parameters can be referenced as global variables.
Functions other than scenes
SET 1: Basic Library
★ Libraries for frequent use and quick implementation
AMID: Expand the arguments to positive and negative and do mid().
BPACK: Pack the value of the bit specification with bit width.
BUNPACK: Slice the value with bit width.
CAT: Concatenate tables. Indexes are added last and identical keys are overwritten.
COMB: Combines two tables to create a hash table.
ECPALT: Set transparency from palette table.
HTD: Split a continuous string of hexadecimal numbers into a table.
HTBL: Converting a string to a table(Multidimensional Array / Hash Table / Jagged Arrays)
INRNG: Tests that the specified value is within a range.
JOIN: Joins strings with a delimiter.
MKPAL: create a color swap table for use in PAL()
.
MSPLIT: Multi-layer split.
OPRINT: Print with outline.
RCEACH: Iterate from rectangle values.
REPLACE: Perform string substitutions.
TBFILL: Creates a table filled with the specified values.
TMAP: More compact operable foreach iterator.
TOHEX: Digit-aligned hexadecimal conversion (not including 0x).
TTABLE: If the argument is a table, the table is returned.
SET 2: Libraries to create objects
★ Rectangles that incorporate judgment and drawing, scenes that manage screen and operation transitions
EXRECT: Creates a rectangle object with extended functionality.
MKSCENES: This post! Manage screen and operation switching.
SET 3: Debugging Library
★ Real-time or stop and inspect at any timing
DBG: Displays any timing debugging value.
DMP: Dumps information about a variable.
++ REMOVED ++
UPDATE HISTORY
Please do not use this library and its code for the purpose of promoting vaccines.
Hello, everyone.
A few days ago, a game I created called KONSAIRI was released on Steam!
http://store.steampowered.com/app/1448220/
There are still very few examples of PICO-8 games on the Steam platform as PICO-8 games.
I think that's because, as content, PICO8 titles are seen as lacking when compared to other game engines and those created in a free development environment with no restrictions.
But I challenge you to dream of being in the same store as a masterpiece game, despite its limitations.
I also wish to see more interest in PICO-8 in my part of Japan.
[0x0] | |
Hello.
Suggestion.
I would like the exported file to include the current config.txt (global_config.txt) as local_config.txt in the exported file.
This will allow us to play from the creator's ideal config in another user's environment.
"global_config.txt" refers to the config.txt that I've been using.
If both global_config.txt and local_config.txt exist, local_config.txt is assumed to take precedence.
Sequence of events
A question thread containing this
https://www.lexaloffle.com/bbs/?tid=39940
Is there a recommended coding method that would eliminate the drop frames that occur when the pico8 window is turned to the back?
Or is there a memory address I can set?
I want to keep the number of times to execute _update60() and draw() the same, even at 30fps.
Before I knew it, I had made a lot of them...
I'm developing KONSAIRI, a game I've been working on for a while now that I'm finalizing and checking throughout the game.
As I mentioned before, the goal of the game is to move back and forth between 16 different areas to reach the final destination.
However, it seemed to feel like the same old thing before you even reach halfway through the game.
That's why i added Dungeon mode, which changes the look and feel of the adventure dramatically.
Not only do you take damage when you touch an enemy, but there are hidden passages and hints scattered throughout the game that will help you get to the true ending.
When you stand in front of an enemy, you will see a timing gauge.
It's not for attacking, but for getting through to the enemy's rear.
A well-timed "step move" will allow you to move forward with no damage.
If time passes, you will be damaged.
If you move away from the spot, you can avoid the danger.
You can bring in items, throw them and use skills.
You can open doors, read hints, light up and explore, and more...!
KONSAIRI TRIAL version
I think being able to scroll horizontally with "Shift + mouse wheel" would make it easier to check for longer lines.
I can also use line breaks to keep up appearances, but I don't want to add too many characters.
Current Development
I'm building a relationship between NPCs and area map connections.
These are mainly for the latter 8 areas.
(The "keys" that NPCs have might be easier to understand.)
This game has a combined total of 16 areas.
There are also useful items that will help you move through such a large world.
These items can be found at the end of the first half of the game.
Then, the image below shows the map of the first half of the game.
Reduced map for 8 areas
Most of the maps are over 128*128 cell size.
The aspect ratio varies from area to area and the structure is challenging to explore.
Once you get your "KUWAI", use it! You can look around the entire area.
Actual map display
An animated tile is provided in each area.
These tiles bring about the effect of the wind.
You can use "PERSNIP" to change the wind (flow).
Awaking bells
The status limit is relaxed when you earn a BELL.
When you earn bells, the status limit is relaxed.
Bells can be earned by eating with NPCs when your friendship is somewhat higher.
The higher your status, the less items you'll have to wear out or take time to move around.
The color of the BELL is the color of the POT
Acquiring a bell of the same color (material) will have no effect.
You may be able to get bells of a different color from a different NPC.
The color of the pot and the color of the bell are the same; check it when you help the NPC.
Updated KONSAIRI trial version!
The performance of the action part has been improved!
Download a playable file here.
https://bitchunk.itch.io/konsairi
Have fun in a small and wide world! ;)
Does the random value generation by srand() always produce the same pattern output as long as the same seed value is input?
Does the output pattern change due to a change in the environment?
For example, the upgrades, the amount of code, the timing of the exports, the machine or OS you're running...
So far I haven't been able to verify much and I haven't encountered the fact that the output results have changed, but I am concerned.
Thanks for your help.
I'm working on a big project for PICO8.
Around the end of 2018, I learned about the scalability of multi-carting and continued to research and create it to this day.
We were able to give each of the four carts a role, rather than just being a data bank .
Cart 1: Title/Ending/3D dungeon scene
Cart 2: Platformer Scene
Cart 3: Cooking Scene
Cart 4: World Map Scene/Important Item Riddle Solving Operation
Because of these many factors, an hour or more of play is a must.
Data saves are automatic.
(Position when resume, growth and LIFE, possessions, time, status of NPCs helped, farmland, important items, veggies, history of veggies removed, history of enemies removed, and other things for cart-to-cart interaction).
Most of the game system is complete. I'm currently assembling the map for the later areas.
If anyone is planning an original, reasonably large game, PICO8 will be used as a prototype. It looks like they will progress the production and do the actual product in another game engine. I've seen some of those opinions. (Not my project.)
So sometimes what I do seems like a waste of time or laziness in choosing a development environment.
I don't see a lot of things planned in PICO8 from start to finish. It's not much.
Is it because of the scarcity that I am still developing? I don't think that's the only reason.
I'm not great at asking questions and such. Still, I've been able to implement a lot of features in the game because people before me have been posting and discussing their work repeatedly. Thanks for leaving the information, very grateful to you.
(I think the English translation is unnatural because it is a long sentence.)
A new version has been released!
What the tool can do
- 3D modeling in 15x15x15 size.
- Save and load into a sprite sheet.
- Export the loading code from the sprite sheet.
- Export the drawing code of the 3D model.
Control are followings(WIP)
Reference
Examples of actual use
KONSAIRI
Export Star Model(Sample)
updated (v0.2.3)
- Added: Display of the next surface to be generated.
- Added: Blinking of the face to be drawn by the selected vertex.
- Added: Blinking of the cursor and vertex pointer.
- Adjusted: Shader filter switching.
- Adjusted: Shader palette.
- Adjusted: Rendering of trifill.
- Deleted: 4 grid lines on each axis.
Old ver
v0.2.2
v0.2.1
v0.2.0
v0.1.0
I am working on a small 3D modeling tool separate from the main game project.
The created 3D model is written to a sprite, and it is ready to be read.
However, operations and views are very confusing.
No such tool exists on the PICO-8 platform. (Or not seen)
I guess it's probably because there's an alternative and it's easier to produce.
Would you like to take advantage of this tool, even if it is paid?
PICO-8 Telmin!
CONTROLLS
- mouse button: PLAY SFX
- Z / X : Change waveform(0~7) and custom instruments(8~15)
- mouse wheel : Change SFX Duration
old version
Feature Overview
This is a script that parses String data and converts it into a hash table. (Not compatible with JSON)
- A single string can initialize many values.
- Returns at least an empty table.
- Elements can be added space-separated. (the space character cannot be used as a value.)
{}
specifies a table.key=val;
key{val}
specifies the key and value of the table.- Newline codes are ignored.
- Bool values, Nil, and Hexadecimal strings are automatically normalized.
- The first level can be initialized with global values by using cat() in _env.
CAT(_env,HTBL[[VALUES]]) --init with 5tokens
- Double quotation marks are not used (they tend to be fewer characters than JSON).
- Not compatible with JSON.
- HTBL() uses 150 Token.
"k{v1 v2 ...}"
is table. serve just Immediately before hashkey.
"k=v;"
is key and value.
See code in cart for examples of format usage.
The parser normalizes individual values using TONORM() in the following order of precedence.
- Number(hexadecimal)
- String
- Bool
- Nil
may want to Use DMP() if check the converted table.
This function is included in the KNUTIL library.
UPDATE history
old ver
Happy Update PICO-8!
U or D: Change line length
L or R: Change line width
X : Sub line
Z : Add line
X + Z : Reset the center sprite
View Older Posts